1. Field of the Invention
The present invention is related to the field of computer systems. Specifically the present invention relates to the field of implementing a class hierarchy of objects in a hierarchical file system.
2. Art Background
It is quite common in the computer industry to offer on any computer system a wide range of applications, such as desktop publishing, databases, spreadsheets, graphics and so on. Typically in a window-based computer system, there is a special application often called a desktop manager to invoke and manipulate the various applications when required by the users. For instance, the desktop manager displays icons representing objects and interprets user gestures such as clicking on icons, dragging icons from place to place and dropping icons on other icons as being requests from the users for certain methods of the objects to be invoked. To do so, the desktop manager must know how objects are represented in the file system of the window-based computer system. Similarly, the same type of information must be available to the applications for them to be able to invoke each other.
In the realm of object oriented programming, an object is an entity comprising data and operations which can be invoked to manipulate the data. Object users manipulate the data by invoking the operations. Objects are organized as class instances and classes. The data are contained in the class variables and/or the class instance variables. The operations that can be invoked to manipulate the data are defined in the methods of the class. Additionally, these classes and a root class are ordered into a hierarchy. Each class, except the root class, is subclassed to at least one of the other classes, with the subclass inheriting the class methods, class instance variables and class variables of the other classes. The other classes are also referred as the super classes of the subclass. A methods of a class is invoked on a class or an instance of a class by sending a message comprising the class/class instance, the method and the method's its arguments, using a send primitive. Furthermore, in the context of a class method invoking another class method, there is a pseudo class instance/class "Self" and a pseudo class "Super". The pseudo class instance/class "Self" refers to the current class instance/class upon which the invoking class method was invoked. The pseudo class "Super" refers to the invoking class method's super class. For further information on object-oriented design and programming techniques, see B. Meyer, Object-oriented Software Construction, (Prentice Hall, 1988), pp. 65-372.
The requirement of enabling the applications, the desktop manager in particular, to have access to object representation information, may be satisfied through additional file attributes in the file system of the window-based computer system. For example, each file in the Macintosh system comes in two parts, a data fork and a resource fork. The resource forks are used for many things, including icons, fonts, cursors and an application's code. Each resource has a resource type, for examples, "ICONS", or "MENUS". The resource type determines the resource information content and the resource information structure. The resource information content and structure are agreed on between the application that creates them and the applications that use them. For further information on resources in Macintosh, see S. Chernicoff, Macintosh Revealed; Vol 1--Unlocking the Toolbox, 2nd Edition (Hayden Books, 1988), pp. 275-326.
For a window-based computer system with a hierarchical file system, for example, UNIX, there are two main ways in which objects are represented:
(1) In the form of normal files whose names and attributes are indices into a database of heuristics read by the desktop manager. An example of such heuristics would be files whose names end with the character string ".c". These files use a particular icon and are opened by invoking the command "vi" on them. It is believed the heuristics technique was first used at the Information Technology Center at Carnegie-Melon University in 1984;
(2) In the form of directories read by the desktop manager. For example, an object is represented as a directory with a convention governing the names in the directory used for particular attributes. An icon image might be found in a file called "Icon" and the command to be invoked on double-clicked in the file called "double-clicked.". The directory technique is believed to be employed by NeXT's desktop manager found in systems manufactured by NeXT, Inc., Redwood City, Calif., among others. (NeXT is a registered trademark of NeXT, Inc.)
However, neither of these approaches fully support data abstraction and inheritance, the hallmarks of object oriented programming. Data abstraction means that the implementation of objects are encapsulated from the use of the objects. Inheritance means that the implementation of objects are related to each other hierarchically.
As will be described, the present invention overcomes the disadvantages of the prior art, and provides a method and apparatus for object representation in a hierarchical file system, without requiring the support of additional file attributes by the hierarchical file system.